%demo script to show how to use this functions
%load test matrix
[img_data,]=loadEnviData('dragon/data/meris/MER_FR__1PNEPA20100422_162343_000000982088_00441_42579_8412');
disp('load data completed');
test_data=img_data(500:599,500:599,:);
artificial_label=test_data(:,:,5)>5600;
%train model
model=train_xy(test_data,artificial_label,'svm','');
%cross validation
accuracy=cv(test_data,artificial_label,'svm','',5);
%test 
predict_label=test_xy('svm',model,test_data);
imshow(predict_label);
%example for grid search
[ best_c,best_g ] = RBF_grid(test_data,artificial_label,1,100,50,1,100,50,5);
disp(['best_c: ',num2str(best_c),' best_g ',num2str(best_g)])


